
/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
// RoomEnter.h
//

#pragma once

#include <BaseDefine.h>

class User;
class Room;
class RoomEnter{
public:
	virtual int enter( size_t room_ident, User* user, Room* room, const char* passwd, bool isQuick = false ) = 0;

	RoomEnter(){}
	virtual ~RoomEnter(){}

protected:
private:
};

class RoomEnter_Decorator : public RoomEnter{
public:
	int enter( size_t room_ident, User* user, Room* room, const char* passwd, bool isQuick ){
		if( preProcess_ )
			return preProcess_->enter( room_ident, user, room, passwd, isQuick );

		return 0;
	}

	RoomEnter_Decorator( RoomEnter* preProcess ){
		preProcess_ = preProcess;
	}

	virtual ~RoomEnter_Decorator(){};

protected:

private:
	RoomEnter* preProcess_;
};
